﻿@model First.Models.musicModel
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>newIndex</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#btn').click(function () {
                $.ajax({
                    type: 'get',
                    url:"@Url.Action("jsonIndex", "Index")",
                    dataType: "json",
                    success: function (data) {
                        alert(data);
                    }
                })
            })
        })
    </script>
</head>
<body>
    <div> 
        <table>
            @foreach (var item in Model.m1)
            {
                <tr><td>@item.name</td><td>@item.note</td></tr>  
            }
        </table>
    </div>
    <div>
        <table>
            @foreach (var item in Model.m2)
            {
                <tr><td>@item.name</td><td>@item.note</td></tr>
            }
        </table>
    </div>
    <input id="btn" value="获取json数据" type="button"/>
</body>
</html>
